﻿using DevExpress.XtraBars;
using DevExpress.XtraTab;

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using DevExpress.XtraEditors;
using DXApplicationTangche.UC.圣同润.UC;
using DXApplicationTangche.UC.圣同润;
using DXApplicationTangche.service;

namespace DXApplicationTangche
{
    public partial class FluentDesignForm圣同润 : DevExpress.XtraBars.FluentDesignSystem.FluentDesignForm
    {
        public FluentDesignForm圣同润()
        {
            InitializeComponent();
            //FormMTO定制下单 form = new FormMTO定制下单();
            //this.initPanel(form);
            ResourceService.synPictureResouces();

            ////进入Form保存抖音excel模板
            //byte[] buffer = Properties.Resources.抖音出库单;//获取嵌入dll文件的字节数组  
            //string strPath = Application.StartupPath + @"\tag\" + "抖音出库单.xlsx";//设置释放路径   导出路径
            //                                                                   //创建dll文件（覆盖模式）  
            //using (FileStream fs = new FileStream(strPath, FileMode.Create))
            //{
            //    fs.Write(buffer, 0, buffer.Length);
            //}

            ////进入Form保存生产计划视图excel模板
            //byte[] bufferMrp = Properties.Resources.生产计划视图;//获取嵌入dll文件的字节数组  
            //string strPathMrp = Application.StartupPath + @"\tag\" + "生产计划视图.xlsx";//设置释放路径   导出路径
            //                                                                       //创建dll文件（覆盖模式）  
            //using (FileStream fs = new FileStream(strPathMrp, FileMode.Create))
            //{
            //    fs.Write(bufferMrp, 0, bufferMrp.Length);
            //}

            ////进入Form保存进出库明细excel模板
            //byte[] bufferInout = Properties.Resources.进出库明细;//获取嵌入dll文件的字节数组  
            //string strPathInout = Application.StartupPath + @"\tag\" + "进出库明细.xlsx";//设置释放路径   导出路径
            //                                                                        //创建dll文件（覆盖模式）  
            //using (FileStream fs = new FileStream(strPathInout, FileMode.Create))
            //{
            //    fs.Write(bufferInout, 0, bufferInout.Length);
            //}
        }
        
        private void initPanel(Form frm)
        {
            this.panel页面.Controls.Clear();
            //指示窗体显示是否为顶级窗口
            frm.TopLevel = false;
            this.panel页面.Controls.Add(frm);
            frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            frm.Dock = System.Windows.Forms.DockStyle.Fill;
            frm.Show();
        }
        private void initPanel(XtraUserControl frm)
        {
            this.panel页面.Controls.Clear();
            //指示窗体显示是否为顶级窗口
            this.panel页面.Controls.Add(frm);
            frm.Dock = System.Windows.Forms.DockStyle.Fill;
            frm.Show();
        }

        private void accordionControlElement1_Click(object sender, EventArgs e)
        {
            this.initPanel(new XtraUserControl选品("海鲜水产"));
        }

        private void accordionControlElement4_Click(object sender, EventArgs e)
        {
            this.initPanel(new XtraUserControl选品("滋补养生"));
        }

        private void accordionControlElement5_Click(object sender, EventArgs e)
        {
            this.initPanel(new Form达人信息一览());
        }
    }
}
